<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript">
    $(function () {
        var entityManagement = new EntityManagement();
        entityManagement.entityName = "资源";
        entityManagement.entityPath = "/auth/resource";
        entityManagement.entityTable = "management";
        $("#" + entityManagement.entityTable).flexigrid({
            url:'list.action',
            dataType:'json',
            colModel:[
                {display:'ID', name:'id', width:100, sortable:true, align:'center', hide:false},
                {display:'名称', name:'name', width:100, sortable:true, align:'center'},
                {display:'优先级', name:'priority', width:100, sortable:true, align:'center'},
                {display:'资源值', name:'value', width:200, sortable:true, align:'center'},
                {display:'授权列表', name:'authNames', width:200, sortable:true, align:'center'}
            ],
            buttons:[
                {name:'新增', bclass:'add', onpress:entityManagement.add},
                {separator:true},
                // 设置分割线
                {name:'修改', bclass:'edit', onpress:entityManagement.edit},
                {separator:true}
                /*{name:'删除', bclass:'delete', onpress:entityManagement.confirmDel},
                {separator:true}*/
            ],
            searchitems:[
                {display:'ID', name:'filter_EQL_ID', isdefault:true}
            ],
            sortname:"id",
            sortorder:"asc",
            usepager:true,
            title:'',
            useRp:true,
            checkbox:true, // 是否要多选框
            rowId:'id', // 多选框绑定行的id
            rp:40,
            showTableToggleBtn:true,
            width:'auto',
            minwidth:10,
            height:430
        });
    });
</script>